import service from '@/utils/request'

const EquipApi = {
  // ------------------标本箱------------------
  addEquipSpecimen: function (data) {
    return service.post('equip/specimen', data)
  },
  editEquipSpecimen: function (data) {
    return service.put('equip/specimen', data)
  },
  deleteEquipSpecimen: function (data) {
    return service.delete('equip/specimen', {data: data })
  },
  listEquipSpecimen: function (data) {
    return service.get('equip/listSpecimen', {params: data })
  },
  getEquipSpecimenInfo: function (data) {
    return service.get('equip/specimenDetail', {params: data })
  },
  getSpecimenUsage: function (data) {
    return service.get('equip/specimenUsage', {params: data })
  },
  getTempForSelect: function (data) {
    return service.get('equip/tempForSelect', {params: data })
  },

  // -----------------------温度--------------------
  addEquipTemperature: function (data) {
    return service.post('equip/temperature', data)
  },
  editEquipTemperature: function (data) {
    return service.put('equip/temperature', data)
  },
  deleteEquipTemperature: function (data) {
    return service.delete('equip/temperature', {params: data })
  },
  listEquipTemperature: function (data) {
    return service.get('equip/listTemperature', {params: data })
  },
  getEquipTemperatureInfo: function (data) {
    return service.get('equip/temperature', {params: data })
  },
  getEquipTemperatureRecords: function (data) {
    return service.get('equip/temperature/records', {params: data })
  },
  exportEquipTemperatureRecords: function (data) {
    return service.get('equip/temperature/export', {params: data })
  },

  // ---------------呼叫器----------------
  addEquipBeeper: function (data) {
    return service.post('equip/beeper', data)
  },
  deleteEquipBeeper: function (data) {
    return service.put('equip/beeper/delete', data)
  },
  editEquipBeeper: function (data) {
    return service.put('equip/beeper', data)
  },
  listEquipBeeper: function (data) {
    return service.get('equip/beeper/list', {params: data })
  },
  getEquipBeeperInfo: function (data) {
    return service.get('equip/beeper', {params: data })
  },
  checkEquipBeeperList: function (data) {
    return service.get('equip/beeper/record/list', {params: data })
  },
  checkEquipBeeperHeartbeatList:function(data){
    return service.get('equip/beeper/log/list', {params: data })
  },
  updateRecord:function(data){
    return service.put('equip/beeper/record/updateRecord', data)
  },
  // ----------------住户管理--------------
  addBeeperHouse:function(data){
    return service.post('beeperHouse', data)
  },
  deleteBeeperHouse:function(data){
    return service.put('beeperHouse/delete', data)
  },
  editBeeperHouse:function(data){
    return service.put('beeperHouse', data)
  },
  listHouse:function(data){
    return service.get('beeperHouse/listIdName', {params:data})
  },
  listBeeperHouse:function(data){
    return service.get('beeperHouse/page', {params:data})
  },
  getBeeperHouseInfo:function(data){
    return service.get('beeperHouse', {params:data})
  },
  // ----------------商户管理-----------------
  listBeeperBusiness:function(data){
    return service.get('beeperBusiness/page', {params:data})
  },
  addbeeperBusiness:function(data){
    return service.post('beeperBusiness', data)
  },
  editBeeperBusiness:function(data){
    return service.put('beeperBusiness', data)
  },
  deleteBeeperBusiness:function(data){
    return service.put('beeperBusiness/delete', data)
  },
  getBeeperBusinessInfo(data){
    return service.get('beeperBusiness', {params:data})
  },
  getBeeperBusinessInfoByBusinessId(data){
    return service.get('beeperBusiness/listIdNameByServerId', {params:data})
    
  },
  // ---------------服务信息
  listBeeperServer:function(data){
    return service.get('beeperServer/listIdName', {params:data})
  },

  // ---------------标本箱 新----------------
  addEquipBox: function (data) {
    return service.post('equip/box', data)
  },
  editEquipBox: function (data) {
    return service.put('equip/box', data)
  },
  getEquipBoxInfo: function (data) {
    return service.get('equip/box', {params: data })
  },
  getIdBySyUserId: function (data) {
    return service.get('equip/box/getIdBySyUserId', {params: data })
  },
  changeEquipCmd: function (data) {
    return service.get('equip/box/cmd', {params: data })
  },
  deleteEquipBox: function (data) {
    return service.delete('equip/box', { data: data })
  },
  listEquipBox: function (data) {
    return service.get('equip/box/list', {params: data })
  },
  getEquipBoxLogTable: function (data) {
    return service.get('equip/box/log/list', {params: data })
  },
  getEquipBoxRecordTable: function (data) {
    return service.get('equip/box/record/list', {params: data })
  },
  exportEquipBoxLogs: function (data) {
    return service.get('equip/box/log/export', {params: data })
  },

  // ---------------------标本箱用户列表 --------------------
  addEquipBoxUser: function (data) {
    return service.post('equip/box/user', data)
  },
  editEquipBoxUser: function (data) {
    return service.put('equip/box/user', data)
  },
  deleteEquipBoxUser: function (data) {
    return service.delete('equip/box/user', { data: data })
  },
  changeEquipBoxUserCmd: function (data) {
    return service.get('equip/box/user/changeFid', {params: data })
  },
  listEquipBoxUser: function (data) {
    return service.get('equip/box/user/list', {params: data })
  },

}

export default EquipApi
